echo "数据迁移任务开始："${dt}
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/mf_archives
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/mf_fundmanager
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/mf_nvperformhis
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/mf_personalinfo
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/stk_coconcept
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/stk_companyarchives
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/stk_conceptlist
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/stk_performanceday
hadoop fs -mkdir -p /ai_marketing/data_migra/${dt}/tp_sync/stk_performanceletters
echo "数据迁移任务结束："${dt}

# 启动openmldb
./openmldb --zk_cluster=172.18.8.45:2182 --zk_root_path=/openmldb_cluster_v8 --role=sql_client

# 查看进程状态
查看进程状态 : ps -f | grep tablet

hadoop fs -rm -r /ai_marketing/data_migra

hadoop fs -ls /ai_marketing/data_migra/20230920/tp_sync/mf_archives/mf_archives__e10d5276_73e2_486c_a715_d4001bec991a.gz

hadoop fs -get /ai_marketing/data_migra/20230920/tp_sync/stk_coconcept/mf_archives__e10d5276_73e2_486c_a715_d4001bec991a.gz /test

USE ai_test_db;

USE ai_marketing_db;

SET @@execute_mode='offline';

LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/mf_archives/*' INTO TABLE ai_marketing_db.mf_archives options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/mf_fundmanager/*' INTO TABLE ai_marketing_db.mf_fundmanager options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/mf_nvperformhis/*' INTO TABLE ai_marketing_db.mf_nvperformhis options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/mf_personalinfo/*' INTO TABLE ai_marketing_db.mf_personalinfo options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/stk_coconcept/*' INTO TABLE ai_marketing_db.stk_coconcept options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/stk_companyarchives/*' INTO TABLE ai_marketing_db.stk_companyarchives options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/stk_performanceday/*' INTO TABLE ai_marketing_db.stk_performanceday options(deep_copy=false, mode='append');
LOAD DATA INFILE '/ai_marketing/data_migra/${dt}/tp_sync/stk_performanceletters/*' INTO TABLE ai_marketing_db.stk_performanceletters options(deep_copy=false, mode='append');




# deep_copy=true为硬拷贝，deep_copy 为 true 时只能用 overwrite 模式
# overwrite: 仅离线模式可用，数据将覆盖离线表数据。
#	append：离线在线均可用，若文件已存在，数据将追加到原文件后面。在线导入只允许mode='append'